package me.whf.util;

import java.util.TimerTask;

import me.whf.dao.AccountDAO;
import me.whf.dao.factory.DAOFactory;

public class MonthTask extends TimerTask {
	private boolean ishalfMonth;
	
	public MonthTask() {
		ishalfMonth = false;
	}
	
	@Override
	public void run() {
		if (!ishalfMonth) {
			AccountDAO accountDAO = DAOFactory.getDAOFactory().getAccountDAO();
			accountDAO.monthSettlement();
		}
		ishalfMonth = !ishalfMonth;
	}
}
